package com.liuzh.kaoyanspringboot.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.liuzh.kaoyanspringboot.entity.Article;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-10
 */
public interface ArticleService extends IService<Article> {


    Page<Article> findPage(Page<Article> page, String name, Integer userId);

    Article findById(Integer id);

    List<Article> findAll(Integer userId);
    boolean decrementLike(Integer id);

    boolean increaseLike(Integer id);

    boolean reNewById(Article article);

    Article miniFindById(Integer articleId);

    boolean decrementCollect(Integer id);

    boolean increaseCollect(Integer id);

    Page<Article> findCollectPage(Page<Article> page, Integer collectId, String articleName);

    Integer myCount();

    List<Article> listDate();

    List<Article> findSlideshow();
}
